package com.enlf.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.enlf.dto.LoginFormDTO;
import com.enlf.dto.R;
import com.enlf.dto.Result;
import com.enlf.entity.MenuPermission;
import com.enlf.entity.User;
import com.enlf.utils.CodeEnum;
import com.enlf.vo.UserInfoVo;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author renge
 * @since 2023-9-11
 */
public interface IUserService extends IService<User> {

    /**
     * 发送短信验证码
     * @param phone
     * @param session
     * @return
     */
    Result sentCode(String phone, HttpSession session);

    /**
     * 用户登录
     * @param loginForm
     * @param session
     * @return
     */
    Result login(LoginFormDTO loginForm, HttpSession session);

    Map<String,String> loginAdmin(LoginFormDTO loginForm, HttpSession session);

    List<MenuPermission> queryAdminPermission(Long userId);

    List<User> queryAll();

    Result sign();

    Result signCount();

    R updateUser(UserInfoVo userInfoVo);

    R saveUser(UserInfoVo userInfoVo);

}
